<div class="col-sm-8 offset-sm-2 col-md-6 offset-md-3">
  <h1><%= t(".sign_in") %></h1>

  <% if ENV.fetch("FORCE_OIDC", nil) == "enabled" %>

    <%- if devise_mapping.omniauthable? %>
      <%- resource_class.omniauth_providers.each do |provider| %>
        <%= button_to t("devise.shared.links.sign_in_with_provider", provider: ENV.fetch("OIDC_NAME", OmniAuth::Utils.camelize(provider))), omniauth_authorize_path(resource_name, provider), method: :post, class: "btn btn-primary", data: {turbo: false} %>
      <% end %>
    <% end %>

  <% else %>
    <%= form_for resource, url: session_path(resource_name) do |form| %>

      <div class="tabular-form">
        <%= text_input_row form, :email, autofocus: true, autocomplete: "email" %>
        <%= password_input_row form, :password, autocomplete: "current-password" %>
        <%= checkbox_input_row form, :remember_me if devise_mapping.rememberable? %>
        <div>
          <%= form.submit translate(".sign_in"), class: "btn btn-primary" %>
        </div>
      </div>
    <% end %>

    <%= render "devise/shared/links" %>
  <% end %>
</div>
